﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;

namespace PlutoStudio
{
    /// <summary>
    /// HttpUtility扩展方法类。
    /// </summary>
    public static class HttpUtilityExtensions
    {
        /// <summary>
        /// 对 URL 字符串进行编码。
        /// </summary>
        /// <param name="value">要编码的文本。</param>
        /// <returns>已编码的字符串。</returns>
        public static string UrlEncode(this string value)
        {
            return HttpUtility.UrlEncode(value);
        }
        /// <summary>
        /// 对 URL 字符串进行编码。
        /// </summary>
        /// <param name="value">要编码的文本。</param>
        /// <returns>已编码的字符串。</returns>
        public static string UrlDecode(this string value)
        {
            return HttpUtility.UrlDecode(value);
        }
    }
}
